package smartagdemo.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import smartagdemo.bean.HumidityData;
import smartagdemo.bean.LightData;
import smartagdemo.bean.TemperatureData;
import smartagdemo.bean.TestData;
import smartagdemo.mapper.ViewMapper;
import smartagdemo.service.ViewService;

import java.sql.Timestamp;
import java.util.List;

@Service
public class ViewServiceImpl implements ViewService {

    @Autowired
    private ViewMapper viewMapper;
//查看测试数据
    @Override
    public List<TestData> viewTest(Timestamp date1, Timestamp date2) {
        return viewMapper.viewTestData(date1,date2);
    }
//查看湿度数据
    @Override
    public List<HumidityData> viewHumidityData(Timestamp date1, Timestamp date2) {
        return viewMapper.viewHumidityData(date1,date2);
    }
//查看温度数据
    @Override
    public List<TemperatureData> viewTemperatureData(Timestamp date1, Timestamp date2) {
        return viewMapper.viewTemperatureData(date1,date2);
    }
//查看光照数据
    @Override
    public List<LightData> viewLightData(Timestamp date1, Timestamp date2) {
        return viewMapper.viewLightData(date1,date2);
    }
//查看当日湿度数据
    @Override
    public List<HumidityData> viewDateHumidity(Timestamp date1, Timestamp date2) {
        return viewMapper.viewDateHumidity(date1,date2);
    }
//查看当日温度数据
    @Override
    public List<TemperatureData> viewDateTemperature(Timestamp date1, Timestamp date2) {
        return viewMapper.viewDateTemperature(date1,date2);
    }
//查看当日光照数据
    @Override
    public List<LightData> viewDateLight(Timestamp date1, Timestamp date2) {
        return viewMapper.viewDateLight(date1,date2);
    }
}
